<template>
  <div class="dog_div">
    <img :src="dogUrl" alt="" />
    <h3 @click="btn">{{ dogName }}</h3>
  </div>
</template>

<script>
export default {
  props: {
    dogUrl: String,
    dogName: String,
  },
  methods: {
    btn() {
      this.$emit("dogName", this.dogName);
    },
  },
};
</script>

<style>
.dog_div {
  width: 200px;
  border: 1px solid black;
  text-align: center;
  float: left;
}

.dog_div img {
  width: 100%;
  height: 200px;
}
</style>